<div class="panel panel-info">
	<div class="panel-heading"><h3 class="panel-title">哇咔后台管理系统--商户管理</h3></div>
	<div class="panel-body">商户管理功能说明内容</div>
	<table class="table table-bordered table-hover">
		<thead>
		<tr>
			<th class="col-md-1 text-center">ID</th>
			<th class="col-md-4 text-center">商户名称</th>
			<th class="col-md-3 text-center">商户联系电话</th>
			<th class="col-md-2 text-center">签约到期时间</th>
			<th class="col-md-2 text-center">操作</th>
		</tr>
		</thead>
		<tbody>
		<tr ng-repeat="rows in shopList">
			<td>{{rows.sid}}</td>
			<td>{{rows.title}}</td>
			<td>{{rows.tel}}</td>
			<td class="text-center" my-widget="status" for-sid="{{rows.sid}}" for-vip="{{rows.vip_limit}}"></td>
			<td class="text-center" my-widget="button" for-sid="{{rows.sid}}" for-vip="{{rows.vip_limit}}"></td>
		</tr>
		</tbody>
		<tfoot>
			<tr>
				<td colspan="5" class="text-right">
					<uib-pagination boundary-links="true" boundary-link-numbers="true" total-items="totalItems" ng-model="currentPage" max-size="maxSize" class="pagination-sm" ng-change="pageChanged()" rotate="false" previous-text="上一页" next-text="下一页" last-text="尾页" first-text="首页" items-per-page="numPerPage"></uib-pagination>
				</td>
			</tr>
		</tfoot>
	</table>
	<script type="text/ng-template" id="showModalContent.html">
		<div class="modal-header">
			<button type="button" class="close" ng-click="cancel()">×</button>
			<h3 class="modal-title">【{{shop.title}}】 的店铺详情!</h3>
		</div>
		<div class="modal-body">
			<div class="row">
				<div class="col-md-12">
					<ul class="list-group">
						<li class="list-group-item active">商铺基础详情</li>
						<li class="list-group-item">
							<div class="row">
								<div class="col-md-3 text-center"><span class="label label-primary">商铺名称: </span></div>
								<div class="col-md-9">{{shop.title}}</div>
							</div>
						</li>
						<li class="list-group-item">
							<div class="row">
								<div class="col-md-3 text-center"><span class="label label-primary">商铺地址: </span></div>
								<div class="col-md-9">{{shop.province}}{{shop.city}}{{shop.dist}}{{shop.suite}}</div>
							</div>
						</li>
						<li class="list-group-item">
							<div class="row">
								<div class="col-md-3 text-center"><span class="label label-primary">联系电话: </span></div>
								<div class="col-md-9">{{shop.telephone}}</div>
							</div>
						</li>
						<div class="list-group-item">
							<div class="row">
								<div class="col-md-3 text-center"><span class="label label-primary">佣金比例: </span></div>
								<div class="col-md-9">{{shop.fee}}% (商户交易金额的百分比作为佣金)</div></div>
						</div>
						</li>
						<li class="list-group-item">
							<div class="row">
								<div class="col-md-3 text-center"><span class="label label-primary">签约时限: </span></div>
								<div class="col-md-9">{{shop.vip_limit|date:'yyyy-MM-dd'}} (商户签约到期时间)</div>
							</div>
						</li>
					</ul>
				</div>
				<div class="col-md-12">
					<ul class="list-group">
						<li class="list-group-item active">商铺财务情况</li>
						<li class="list-group-item col-md-6">员工数量: <span class="badge">{{shop.person}}人</span></li>
						<li class="list-group-item col-md-6">订单次数: <span class="badge">{{shop.orders}}次</span></li>
						<li class="list-group-item col-md-6">支付次数: <span class="badge">{{shop.pay}}次</span></li>
						<li class="list-group-item col-md-6">提现次数: <span class="badge">{{shop.withdraw}}元</span></li>
						<li class="list-group-item col-md-6">冻结资金: <span class="badge">{{shop.freeze}}元</span></li>
						<li class="list-group-item col-md-6">可用余额: <span class="badge">{{shop.money}}元</span></li>
					</ul>
				</div>
			</div>
		</div>
	</script>
	<script type="text/ng-template" id="refusalModalContent.html">
		<div class="modal-header">
			<button type="button" class="close" ng-click="cancel()">×</button>
			<h3 class="modal-title">【{{ shop.title }}】 的签约审核!</h3>
		</div>
		<div class="modal-body">
			<ul class="list-group">
				<li class="list-group-item active">商铺签约审核</li>
				<li class="list-group-item">
					<div class="row">
						<div class="col-md-3 text-center" style="margin-top: 5px;"><span class="label label-primary">商铺名称</span></div>
						<div class="col-md-9">
							<input type="text" name="title" class="form-control input-sm" value="{{shop.title}}" ng-model="shop.title">
						</div>
					</div>
				</li>
				<li class="list-group-item">
					<div class="row">
						<div class="col-md-3 text-center" style="margin-top: 5px;"><span class="label label-primary">商铺地址</span></div>
						<div class="col-md-9">
							<div class="input-group">
								<!--<span class="input-group-addon" style="padding: 5px 15px;">{{shop.province}}{{shop.city}}{{shop.dist}}</span>-->
								<input type="text" name="suite" class="form-control input-sm" value="{{shop.suite}}" ng-model="shop.suite">
							</div>
						</div>
					</div>
				</li>
				<li class="list-group-item">
					<div class="row">
						<div class="col-md-3 text-center" style="margin-top: 5px;"><span class="label label-primary">联系电话</span></div>
						<div class="col-md-9">
							<input type="tel" name="telephone" class="form-control input-sm" value="{{shop.telephone}}" ng-model="shop.telephone">
						</div>
					</div>
				</li>
				<div class="list-group-item">
					<div class="row">
						<div class="col-md-3 text-center" style="margin-top: 5px;"><span class="label label-primary">佣金比例</span></div>
						<div class="col-md-5">
							<div class="input-group">
								<input type="text" name="fee" class="form-control input-sm" value="{{shop.fee}}" ng-model="shop.fee">
								<span class="input-group-addon" style="padding: 5px 15px;">%</span>
							</div>
						</div>
						<div class="col-md-4">(交易金额的百分比)</div>
					</div>
				</div>
				</li>
				<li class="list-group-item">
					<div class="row">
						<div class="col-md-3 text-center"><span class="label label-primary">签约时限: </span></div>
						<div class="col-md-5">
							<div class="input-group">
								<input type="text" class="form-control input-sm" uib-datepicker-popup="{{format}}" ng-model="shop.dt" is-open="popup.opened"
								       datepicker-options="dateOptions" ng-required="true" close-text="Close" alt-input-formats="altInputFormats"/>
								<span class="input-group-btn">
									<button type="button" class="btn btn-default" ng-click="calendar()" style="margin-top:1px;padding: 3px 15px">
										<i class="fa fa-calendar"></i>
									</button>
								</span>
							</div>
						</div>
						<div class="col-md-4">(商户签约到期时间)</div>
					</div>
				</li>
			</ul>
		</div>
		<div class="modal-footer">
			<button class="btn btn-primary" type="button" ng-click="submit()">提交审核</button>
			<button class="btn btn-warning" type="button" ng-click="cancel()">取消关闭</button>
		</div>
	</script>
</div>